package movEat.GUI;
import org.eclipse.swt.events.ShellAdapter;
import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Rectangle;

import org.eclipse.swt.widgets.Shell;

public class PayShell{


	static Shell getShell(final MP3 mp3){

		Shell shell = SWTUtil.getShell(GUI.shell);
		shell.setLayout(new org.eclipse.swt.layout.GridLayout(1, false));
		Image pay = new Image(SWTUtil.getDisplay(), "resources/paypalinfo.jpg");
		shell.setBackgroundImage(pay);
		Rectangle r = pay.getBounds();
		shell.setBounds(r.x, r.y, r.width+10, r.height+40);		
		mp3.play();
		shell.addShellListener(new ShellAdapter() {
			public void shellClosed(ShellEvent e) {
				mp3.close();
			}
		});
		
		return shell;


	}
}
